package cn.smile.service;

import cn.smile.pojo.Permission;
import cn.smile.pojo.User;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: MaoSuyu
 * @User：John
 * @Date: 2019/7/4
 * @Time: 17:46
 * @Description: No Description
 */
public interface PermissionService {

    /**
     * 添加权限
     *
     * @param permission
     * @return
     */
    boolean addPermission(Permission permission);

    /**
     * 批量添加权限
     *
     * @param permissions
     * @return
     */
    boolean addPermission(List<Permission> permissions);

    /**
     * 刷新权限
     *
     * @return
     */
    void refreshPermission();

    /**
     * 根据id查询权限
     * @param user
     * @return
     */
    List<String> findPermissionById(User user);

}
